package com.sf.protal.service;

import com.sf.protal.mapper.UmsAdminMapper;
import com.sf.protal.pojo.UmsAdmin;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UmsAdminService {

	@Autowired
	private UmsAdminMapper umsAdminMapper;

	public UmsAdmin login(UmsAdmin umsAdmin) {
		List<UmsAdmin> admins = umsAdminMapper.select(umsAdmin);

		if(admins!=null&&admins.size()>1){
			return null;
		}
		return admins.get(0);
	}
}
